var vcid="";
var vcuserid="";
layui.use(['form', 'util','layer','carousel'], function () {
    var util = layui.util;
    var form = layui.form;
    var layer = layui.layer;
    var carousel = layui.carousel;
});

var app = new Vue({
    el: '#app',
    data() {
        return {
            latestData: "成功",
            items:[],
            itemsHot:[],
            itemsTimely:[],
        }
    },
    mounted: function () {
        this.getLatestProduct();
        window.getLatestProduct = this.getLatestProduct;
        //你忙我帮
      
    },
    methods: {
        getLatestProduct: function () {
            var that = this;
            $.ajax({
                url: basePath + '/news/getNews',
                data: "",
                type: 'GET',
                contentType: "application/json;charset=UTF-8",
                dataType: 'json',
                success: function(msg) {
                    that.items=msg.data[0];
                    that.itemsHot=msg.data[1];
                    that.itemsTimely=msg.data[2];
                },error:function () {
                    layer.msg("系统错误", {
                        time: 1000,
                        icon: 5,
                        offset: '100px'
                    });
                }
            })
        },
        
    }
});